window.onload = function () {

	function clear() {
		element.parentNode.removeChild(element);
	}
	
	function create(page) {
		element.innerHTML = page;
		corps.appendChild(element);
	}

	var accueil = document.querySelector('#acc'),
		realisation = document.querySelector('#rea'),
		contact = document.querySelector('#con'),
		services = document.querySelector('#ser'),
		situer = document.querySelector('#sit'),
		societe = document.querySelector('#soc'),
		corps = document.querySelector('#corps');
		
	var element = document.createElement('div');
		element.id = "element";
	
	accueil.addEventListener('click', function () {
		FAccueil();
	},false);
	
	realisation.addEventListener('click', function () {
		clear();
	},false);
	
	contact.addEventListener('click', function () {
		alert('contact');
	},false);
	
	services.addEventListener('click', function () {
		alert('services');
	},false);
	
	situer.addEventListener('click', function () {
		alert('nous situer');
	},false);
	
	societe.addEventListener('click', function () {
		alert('notre societe');
	},false);
	
	function FAccueil() {
		var page = [
		"<div id = fesse>",
			"<img src = 'images/background.jpg'/>",
		"</div>"
		];
		create(page);
	}

}

